package com.ruoyi.project.cms.product.service;

import com.ruoyi.project.cms.product.domain.ProductMaterial;
import com.ruoyi.project.cms.product.mapper.MaterialMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @CreateTime 2020/5/20 17:26
 */
@Service
public class MaterialServiceImpl implements MaterialService {
    @Autowired
    private MaterialMapper materialMapper;

    /**
     * 查询所有产品材质信息
     */
    @Override
    public List<ProductMaterial> findAll() {
        return materialMapper.selectAll();
    }

    /**
     * 根据id查询产品材质信息
     */
    @Override
    public ProductMaterial findById(int materialId) {
        return materialMapper.selectById(materialId);
    }
}
